
import service from '../utils/request'

//查询所有商品
export function goods_list( payload = {} ){
    return service.get('/goods', { params: payload  } );
}

//查询单个商品
export function goods_info( payload = {} ){
    return service.get('/goods/'+payload.id, { params: payload  } );
}

//分页查询商品
export function goods_list2( payload = {} ){
    return service.get('/goods', { params: payload  } );
}

//排序查询商品
export function goods_list3( payload = {} ){
    return service.get('/goods', { params: payload  } );
}

//模糊查询商品
export function goods_list4( payload = {} ){
    return service.get('/goods', { params: payload  } );
}

//新增商品
export function goods_add( payload = {} ){
    return service.post('/goods', payload );
}

//编辑商品
export function goods_edit( payload = {} ){
    return service.patch('/goods/'+payload.id, payload );
}

//删除商品
export function goods_delete( payload = {} ){
    return service.delete('/goods/'+payload.id, payload );
}



